clear
set more off
cd "..\Data"

/****************************
Table A.1: Response Bias
*****************************/
use responsebiasdata, clear
foreach var in age oos J5_fico T {
mean `var', over(surveyrespondent)
mvtest means `var', by(surveyrespondent)
}


/*****************************
Table 5
******************************/
use surveydata, clear
foreach var in knowfico knowrightfico overestfico underestfico {
mean `var' if T==0
mat temp = e(b)
scalar depvarmean = temp[1,1]
reg `var' T, r
estadd scalar mean = depvarmean
estimates save "..\estimates\reg_`var'.ster", replace
}

/*****************************
Table A.5
******************************/
use surveydata, clear
foreach var in paybill lowbal nocredit manycredit highbal maxlimit familiarfico vfamiliarfico finlit_100p {
mean `var' if T==0
mat temp = e(b)
scalar depvarmean = temp[1,1]
reg `var' T, r
estadd scalar mean = depvarmean
estimates save "..\estimates\reg_`var'.ster", replace
}

/*****************************
Table B.1
******************************/
use surveydata, clear
foreach var in viewfico numview {
mean `var' if T==0
mat temp = e(b)
scalar depvarmean = temp[1,1]
reg `var' T, r
estadd scalar mean = depvarmean
estimates save "..\estimates\reg_`var'.ster", replace
}

